package cn.milai.amtc;

import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JButton;
import javax.swing.JFrame;

public class GameForm extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public GameForm() {
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setSize(200, 100);
		setLocationRelativeTo(null);
		JButton bomb = new JButton("BOMB");
		JButton bgm = new JButton("BGM");
		this.add(BorderLayout.WEST, bomb);
		this.add(BorderLayout.EAST, bgm);
		bgm.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				Main.play(AudioConf.bgm());
			}
		});
		bomb.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				Main.play(AudioConf.bomb());
			}
		});
		setVisible(true);
	}

}
